<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page isELIgnored="false"%>
<jsp:include page="../frame/header.jsp"></jsp:include>

<title>添加票务分类</title>
<style>
#picture{
	position:absolute;
	left:600px;
	top:180px;
}
</style>

</head>

<body>
	<div class="container-fluid">
		<div class="row-fluid">
			<div>
				<ul class="breadcrumb">
					<li><a href="#">票务系统</a> <span class="divider">/</span></li>
					<li><a href="#">票务分类</a></li>
				</ul>
			</div>

			<div class="box">
				<div class="box-header well" data-original-title>
					<h2>
						添加或编辑票务分类
					</h2>
					<div class="box-icon">
						<a href="#" class="btn btn-setting btn-round"><i
							class="icon-cog"></i></a> <a href="#"
							class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
						<a href="#" class="btn btn-close btn-round"><i
							class="icon-remove"></i></a>
					</div>
				</div>
				<div class="box-content">
					<form id="myform" class="form-horizontal" method="post" action="<c:url value="/admin/ticket/sort" />">
						<fieldset>
							<input type="hidden" name="menuId" value="${bookMenu.menuId }">
							<input type="hidden" name="menuParent" value="${parentMenu.menuId }">
							<input type="hidden" name="sellerId" value="0">
							
							<div class="control-group">
								<label class="control-label" for="menuParent">上级分类</label>
								<div class="controls">
									<input class="input-xlarge"  type="text"
										value="${parentMenu.menuName }" readonly>
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" for="menuNum">显示顺序</label>
								<div class="controls">
									<input class="input-xlarge" id="menuNum" name="menuNum" type="text"
										value="${bookMenu.menuNum }">
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" for="menuName">分类名称</label>
								<div class="controls">
									<input class="input-xlarge" id="menuName" name="menuName" type="text"
										value="${bookMenu.menuName }" maxlength="50" check-type="required" required-message="请输入分类名称">
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" for="menuDesc">详细描述</label>
								<div class="controls">
									<textarea id="menuDesc" name="menuDesc" rows="8" class="input-xxlarge ">${bookMenu.menuDesc }</textarea>
								</div>
							</div>
							
							<div class="form-actions">
								<button id="saveBtn" type="button" class="btn btn-primary">保存</button>
								<button id="cancelBtn" type="button" class="btn">返回</button>
							</div>
						</fieldset>
					</form>

				</div>
			</div>
			<!--/span-->

		</div>
	</div>
	<!--/row-->
</body>

<jsp:include page="../frame/scripts.jsp"></jsp:include>
<script type="text/javascript">
$(document).ready(function(){
	
	$("#myform").validation();
	
	//返回上一页
	$('#cancelBtn').click(function(){
		window.location.href = '<c:url value="/admin/ticket/sort" />';	
	});
	
	//保存
	$('#saveBtn').click(function(){
		$("#myform").submit();
	})
	
})

	
</script>